<?php

/* @var $this \yii\web\View */
/* @var $content string */

use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use frontend\assets\AppAsset;

AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode($this->title) ?></title>
    <?php $this->head() ?>
</head>
<body>
<?php $this->beginBody() ?>
<div class="wrap">
<!--    顶部导航栏begin-->
    <!--visible-xs-block：手机屏幕可见 visible-sm-block:平板屏幕可见-->
<!--    <div class="mobile-navbar visible-xs-block visible-sm-block">
        
    </div>-->
    <div class="site-head">
        <div class="logo-area">
            独秀网
        </div>
        <div class="search-area">
            <input type="text" class="search_input" placeholder="请输入搜索词"/>
            <input type="button" class="search_btn"/>
        </div>
        <div class="personal-area">
        <?php 
            if (Yii::$app->user->isGuest) {
                echo "<a href='/site/login'>登录</a>";
            } else {
                echo "<a href='/user/default'>我的</a><a href='/works/publish'>发布</a>";
            }
        ?>
        </div>
    </div>
    <!--    顶部导航栏end-->
    
<!--    <div class="container">
        
    </div>-->
    <div class="site-content">
        <?= $content ?>
        
    </div>
    <div class="bottom-blank">&nbsp;</div>
    <div class="footer-box">
        <a href="/"><div class="footer-item">首页</div></a>
        <a href="/friends/default"><div class="footer-item">好友</div></a>
        <a href="/works/publish"><div class="footer-item footer-selected">发布</div></a>
        <a href="/user/default"><div class="footer-item">我</div></a>
    </div>
</div>

<!--<footer class="footer">
    <div class="container">
        <p class="pull-left">&copy; <?= Html::encode(Yii::$app->name) ?> <?= date('Y') ?></p>

        <p class="pull-right"><?= Yii::powered() ?></p>
    </div>
</footer>-->

<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
